package com.kevin.core.util;

import java.io.IOException;
import java.util.Date;
import java.util.Locale;

import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.DeserializationContext;
import org.codehaus.jackson.map.JsonDeserializer;

import com.kevin.core.util.DateUtils;


public class DateDerializer extends JsonDeserializer<Date>{

	@Override
	public Date deserialize(JsonParser parser, DeserializationContext context)
			throws IOException, JsonProcessingException {
		return DateUtils.parse(parser.getText(), DateUtils.FORMAT_EEE_MMM_dd, new Locale("English"));
	}

}
